<?php

function print_navigation($element)
{

// navigation
echo "<nav class=\"navbar navbar-inverse navbar-fixed-top\" role=\"navigation\">\n";

// Brand and toggle get grouped for better mobile display
echo "<div class=\"navbar-header\">\n";

echo "<button type=\"button\" class=\"navbar-toggle\" data-toggle=\"collapse\" data-target=\".navbar-ex1-collapse\">\n";
echo "<span class=\"sr-only\">Toggle navigation</span>\n";
echo "<span class=\"icon-bar\"></span>\n";
echo "<span class=\"icon-bar\"></span>\n";
echo "<span class=\"icon-bar\"></span>\n";
echo "</button>\n";
echo "<a style='color:white' class=\"navbar-brand\" href=\"index.php\">CPE Operation Intelligence</a>\n";
echo "<div style='position:fixed;top:8;left:40%'><h4><span id='cpe_label' class='label label-primary'></span></h4></div>";
echo "<div style='position:fixed;top:0;right:1'><img src='elements/images/ALTRAN_WHITE.png'></img></div>\n";
echo "</div>\n";

//  Top Menu Items
//echo "<ul class=\"nav navbar-right top-nav\">\n";
//echo "<li class=\"dropdown\">\n";
//echo "<a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"fa fa-bell\"></i> <b class=\"caret\"></b></a>\n";
//echo "<ul class=\"dropdown-menu alert-dropdown\">\n";
//require 'show_alerts_dropdown.php';
//echo "</ul>\n";
//echo "</li>\n";
//echo "</ul>\n";

// Sidebar Menu Items - These collapse to the responsive navigation menu on small screens
echo "<div class=\"collapse navbar-collapse navbar-ex1-collapse\">\n";
echo "<ul style='background-color:#34495e' class=\"nav navbar-nav side-nav\">\n";

// item dashboard
echo "<li " . (strcmp($element, "index") === 0 ? "class=\"active\">\n" : ">\n");
echo "<a href=\"index.php\"><i class=\"fa fa-fw fa-dashboard\"></i> Dashboard</a>\n";

echo "<ul>";
echo "<li " . (strcmp($element, "cpe_search") === 0 ? "class=\"active\">\n" : ">\n");
echo "<a href=\"cpe_search.php\">CPE Search</a>\n";
echo "</li>\n";
echo "</ul>\n";
echo "<ul>";
echo "<li " . (strcmp($element, "smart_analysis") === 0 ? "class=\"active\">\n" : ">\n");
echo "<a href=\"smart_analysis.php\">Smart Analytics</a>\n";
echo "</li>\n";
echo "<li " . (strcmp($element, "region_charts") === 0 ? "class=\"active\">\n" : ">\n");
echo "<a href=\"region_charts.php\">CPE Region Distribution</a>\n";
echo "</li>\n";
echo "</ul>\n";
echo "</li>\n";

// item charts
echo "<li id=\"esconde\">\n";
//echo "<a href=\"javascript:;\" data-toggle=\"collapse\" data-target=\"#charts_label\">\n";
echo "<a href=\"javascript:;\" data-toggle=\"collapse\" data-target=\"#charts_label\">\n";
echo "<i class=\"fa fa-fw fa-bar-chart-o\"></i> ";
echo "Charts ";
echo "<i class=\"fa fa-fw fa-caret-down\"></i>\n";
echo "</a>\n";
echo "<ul id=\"charts_label\" class=\"" .(strpos($element, "charts") ? "in \">\n" : "\">\n");
echo "<li " . (strcmp($element, "noise_charts") === 0 ? "class=\"active\">\n" : ">\n");
echo "<a href=\"noise_charts.php\">WiFi Quality</a>\n";
echo "</li>\n";
echo "<li " . (strcmp($element, "network_charts") === 0 ? "class=\"active\">\n" : ">\n");
echo "<a href=\"network_charts.php\">CPE Distribution</a>\n";
echo "</li>\n";
echo "</ul>\n";
echo "</li>\n";


// item tables
/*
echo "<li id=\"esconde_tabelas\">\n";
echo "<a href=\"javascript:;\" data-toggle=\"collapse\" data-target=\"#tables_label\">\n";
echo "<i class=\"fa fa-fw fa-table\"></i> ";
echo "Tables";
echo "<i class=\"fa fa-fw fa-caret-down\"></i>\n";
echo "</a>\n";
echo "<ul id=\"tables_label\" class=\"collapse" . (strpos($element, "tables") ? "in \">\n" : "\">\n");
//echo "<li " . (strcmp($element, "noise_tables") === 0 ? "class=\"active\">\n" : ">\n");
//echo "<a href=\"noise_tables.php\">Noise Tables</a>\n";
//echo "</li>\n";
echo "<li " . (strcmp($element, "network_tables") === 0 ? "class=\"active\">\n" : ">\n");
echo "<a href=\"network_tables.php\">Network Tables</a>\n";
echo "</li>\n";
echo "</ul>\n";
echo "</li>\n";
*/
// item settings
//echo "<li " . (strcmp($element, "settings") === 0 ? "class=\"active\">\n" : ">\n");
//echo "<a href=\"settings.php\"><i class=\"fa fa-fw fa-wrench\"></i> Settings</a>\n";
//echo "</li>\n";

echo "</ul>\n";
echo "</div>\n";

// navbar-collapse
echo "</nav>\n";

if (strcmp($element, "index") === 0 || strcmp($element, "cpe_search") === 0 || strcmp($element, "smart_analysis") === 0)
{
echo "<script>document.getElementById('esconde').style.display = 'none';</script>\n";
echo "<script>document.getElementById('esconde_tabelas').style.display = 'none';</script>\n";
}
else
{
echo "<script>document.getElementById('esconde').style.display = 'block';</script>\n";
echo "<script>document.getElementById('esconde_tabelas').style.display = 'block';</script>\n";
}

}


?>
